package com.spica.spicaschool.persistence.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.spica.spicaschool.bean.User


@Dao
interface UserDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertUser(user: User)


    @Query("SELECT * FROM user WHERE  id =1")
    suspend fun queryUser(): User?

    @Query("DELETE FROM user WHERE id =1")
    suspend fun deleteUser()

}